import request from '@/utils/request.ts'
// 获取菜单
export const getMenuData = () => request.get<any, any>('/admin/acl/permission')
//添加或修改菜单
export const addOrUpdateMenu = (data: any) => {
  if (data.id) {
    return request.put<any, any>('/admin/acl/permission/update', data)
  } else {
    return request.post<any, any>('/admin/acl/permission/save', data)
  }
}
//删除
export const deleteMenu = (id: number) =>
  request.delete<any, any>(`/admin/acl/permission/remove/${id}`)
